import request from '@/utils/request'

// 查询列表
export const getArticleList = ({ current, pageSize }) => {
  return request.get('/admin/interview/query', { params: { current, pageSize } })
}

// 新增文章
export const addArticle = ({ stem, content }) => {
  return request.post('/admin/interview/create', { stem, content })
}

// 编辑文章
export const editArticle = ({ id, stem, content }) => {
  return request.put('/admin/interview/update', { id, stem, content })
}

// 删除文章
export const deleteArticle = id => {
  return request.delete('/admin/interview/remove', { data: { id } })
}

// 预览文章
export const getArticleInfo = id => {
  return request.get('/admin/interview/show', { params: { id } })
}
